package org.neogenesis.web.loader.geoDataseLoader;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;

import org.neogenesis.web.model.Experiment;
import org.neogenesis.web.model.Platform;
import org.neogenesis.web.model.Sample;

public class SOFTLoader {
	
	private static String _database = "!Database";
	
	private static String _platform = "!Platform";
	
	private static String _series = "!Series";
	
	private static String _sample = "!Sample";
	
	private Platform platform;
	
	private Experiment experiment;
	
	private List<Sample> samples;

	public SOFTLoader(String filePath) throws IOException {
		
		BufferedReader reader = new BufferedReader(new FileReader(filePath));
		
		String line = null;
		
		List<String> listDatabase = new ArrayList<String>();
		List<String> listPlatform = new ArrayList<String>();
		List<String> listSeries = new ArrayList<String>();
		List<String> listSamples = new ArrayList<String>();
		
		while ((line = reader.readLine()) != null){
			
			if (line.startsWith("^")) continue;
			
			if (line.startsWith(_database))
				listDatabase.add(line);
			else if (line.startsWith(_platform))
				listPlatform.add(line);
			else if (line.startsWith(_series))
				listSeries.add(line);
			else if (line.startsWith(_sample))
				listSamples.add(line);
		}
		reader.close();
		
		
	}
}
